<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>DistPicker实现三级联动</title>
		<script type="text/javascript" src="js/jquery-1.8.3.js" ></script>
		<script type="text/javascript" src="js/distpicker/distpicker.js" ></script>
		<script type="text/javascript" src="js/distpicker/distpicker.common.js" ></script>
		<script type="text/javascript" src="js/distpicker/distpicker.esm.js" ></script>
		<script type="text/javascript" src="js/bootstrap.js" ></script>
		<link rel="stylesheet" href="css/bootstrap.css" />
		<link rel="stylesheet" href="css/bootstrap-theme.css" />
	</head>
	<body>
		<form class="form-inline mt-2 mb-4">
			<div id="distpicker">
			  <select class="form-control" ></select>
			  <select class="form-control" ></select>
			  <select class="form-control" ></select>
			</div>
		</form>
		<button class="btn btn-primary" id="reset" type="button">Reset</button>
		<button class="btn btn-warning" id="reset-deep" type="button">Reset (deep)</button>
		<button class="btn btn-danger" id="destroy" type="button">Destroy</button>
	</body>
	<script>
		$(function(){
			$("#distpicker").distpicker({
				province: '湖北省',
				city: '武汉市',
				district: '江夏区'
			});
			
			$('#reset').click(function () {
			  $("#distpicker").distpicker('reset');
			});
			
			$('#reset-deep').click(function () {
			  $("#distpicker").distpicker('reset', true);
			});
			
			$('#destroy').click(function () {
			  $("#distpicker").distpicker('destroy');
			});
		})
	</script>
</html>
